<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/jsencrypt/3.0.0/jsencrypt.min.js"></script>
	</head>
	<body>
	</body>
	<script src="zidian.js"></script>
	<script src="huadong.js"></script>
	<!-- <script src="wanzheng.js"></script> -->
	<script type="text/javascript">
		var encrypt = new JSEncrypt();

		// 设置公钥，这里用示例公钥，请替换成你的真实公钥
		var publicKey =
			"-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvnnA4C8lJgXgQrzzt7PA8SJ9IqbkDhHrVxmfjU+tSvHy+oxBBh4IkKwupBjaPawI/23Ep2DAHD4FptQt4iUr33nnCWJFjFI+ic97BentcsrP4RFkfoyurID/YyUsa/DZZPg8xDmmswbRDeNscKnfjuG5BQiQBXJK3VpAdZrUOBmWNPf7WhZZCjKh3RojG8GeSQwJTjMCmXUkk+gwSTBSNCK5a3HgToQ5L4bJpg7zljVLR1yCg9As/yW8sqkhlvsXLwBo7FNWebA+/TJs2+M1HgeNx8O0O9td+Kv1jYwSliWEubf959x75xG9KvTijOrK0Gz6qsHpc6LgNpCScAe+PQIDAQAB-----END PUBLIC KEY-----"


		var n = this.queryid,
			i = this.carnum,
			o = t.getStorageSync("s_userid"),
			s = t.getStorageSync("wxuserid"),
			r = (this.logstr, this.keystr, this.remarkstr),
			f = this.flag;
		"" == this.remarkstr && that.getusergps();
		var h = c.default.secretdate(),
			p = a.default.md5(s + n),
			g = {
				cymxid: n,
				carid: i,
				flag: f,
				deviceid: s + "~" + r
			},
			m = u.default.setEncrypt(l.publiukey, JSON.stringify(g));

		// 'PrKX/XEFVIlENaW462Spvg8ovBCIvEpP+2KpPTwD+rMU7rM2Tn0qDtxy71ZfNuP1ggy36F10V0xAceG6x/RAospbyDLSrHiPZPn3zrUNKuMHeDiTB+/t/HOZfQbQPd1idc5QDl1sagQTN9eXZfKgEidm9kwDgIt60dxfSbnNCFBi8Ux3qFJGCRtYkCfxzZtPW2WJ18xuTRctVaOX1IEXMxmfn8o2Y7tUfKhQBFf8lLK8C1obmdcUA3MAziKi/QXf8InZeno6s8NjiCWIi7RY5frgwqEMZ+Ew5ZNRGQalN/RICZ5U7frcY4bFRFftljnqYWvdV4xPq7BhXm0d4DTj4Q=='
		// 设置公钥
		encrypt.setPublicKey(publicKey);
		// [1,1,1]
		// 待加密的数据
		// var plaintext = JSON.stringify({
		// 	"userid": "158254",
		// 	"lx": 3,
		// 	"wxuserid": "oSmlb48FBkWbAeOOMtXAj4R00SiM",
		// 	"page": 1,
		// 	"cartypestr": "0"
		// });

		var plaintext = JSON.stringify({
			tid: '1006535187',
			flag: 1,
			wxuserid: 'oSmlb48FBkWbAeOOMtXAj4R00SiM'
		});


		// var plaintext = JSON.stringify({
		// 	"userid": "158254",
		// 	"wxuserid": "oSmlb48FBkWbAeOOMtXAj4R00SiM",
		// });
		// userid: t.getStorageSync("s_userid"),
		// 	lx: this.currentTab + 1,
		// 	wxuserid: t.getStorageSync("wxuserid"),
		// 	page: this.pages[this.currentTab],
		// 	cartypestr: this.cartypestr
		// 使用公钥进行加密
		var encrypted = encrypt.encrypt(plaintext);

		// 打印加密后的数据
		console.log('Encrypted:', encrypted);
	</script>
</html>

<title>jsencrypt Example</title>
</head>
<body>